Copyright: Copyright ® 1995,1996 Progress Software Corp.


Contents
 XRef Help Contents

Technical Support             Copyright

What is XRef?

XRef Menu Commands
File Menu
Report Menu
Output Menu
Run Menu
Help Menu

How to Use XRef

Symbols and Their Types

Error Messages

Report File Browser

Textin Utility


 Page Setup

The Page Setup dialog box determines the margins and fonts used in your reports.

Margin Spin Buttons
These control the size of each margin. Margins are measured in hundredths of an inch. The minimum value indicates the extent of the printable area of the page based on the type of printer being used. You cannot set margins below these limits. The maximum size for any margin is 3.00 inches.

Printer Font
Displays a list of fonts your printer supports using the standard Windows font dialog box. Font sizes range from 8 to 18 points. Fonts larger than 18 points are too large for a report to fit on a printed page. Windows imposes an 8-point minimum for all True Type fonts.

OK
Click OK to save the current dialog settings.

Cancel
Click Cancel to cancel changes to the dialog settings and exit the dialog.


 Options

The Options dialog box lets you specify various settings that affect all XRef reports. The Options dialog box is divided into the following three groups:

File Output Options
Default Output Path
Use Graphics Characters in Reports
Page Height
Page Width

Project .INI File Options
Autoload Projects XRef .INI File
Prompt Before Loading

Miscellaneous Options
Conditional Compile ID Prefix
Display Source When Reading

OK
Click OK to save the current dialog settings.

Cancel
Click Cancel to cancel changes to the dialog settings and exit the dialog.


 Output File Extensions

The Output File Extensions dialog box changes the default file extensions for the XRef report output files, the Symbol Database files, and the Extract Source Text (.SPL) files.

Symbol Database Extension
Changes the default .SDB file extension for the Symbol Database file that XRef creates after analyzing your Visual Basic project. If you want to use a different default file extension for a Symbol Database, enter your three-letter extension in this text box.

File Output Extension
Changes the default .XRF file extension for the report output file that XRef creates, when you direct the XRef reports to a file. If you want to use a different default file extension for your report file, enter your three-letter extension in this text box.

Extract Source Text File Extension
Changes the default .SPL extension for the text file that XRef creates when it extracts quoted strings and/or comments from your Visual Basic source code. If you want to use a different default file extension for your extracted text file, enter your three-letter extension in this text box.

OK
Click OK to save the current dialog settings.

Cancel
Click Cancel to cancel changes to the dialog settings and exit the dialog.


 Reports

The Reports dialog box, enabled by the Select Reports...command, specifies the reports you want XRef to generate. XRef offers 10 types of analytical report for Visual Basic projects.

You can choose additional options for most of these reports by selecting the names of the reports from the Report menu. All reports except the Controls Listed by Form and the DLL and OCX Listing reports have dialog boxes that let you specify additional options.

Source Listing	Table of Unused Symbols
Extract Source Text to .SPL	Table of Symbols Used in Procedures
Procedure Tree Diagram	List of Symbols External to a Range
Symbol Summary Table	Controls Listed by Form
Symbol Cross Reference Table	DLL and OCX Listing
OK
Click OK to save the current dialog settings.

Cancel
Click Cancel to cancel changes to the dialog settings and exit the dialog.


 Extract Text

The Extract Text dialog box lets you choose the types of strings you want XRef to extract from your Visual Basic source code. XRef can extract quoted strings, remarks, or both.

XRef writes the extracted text to a single file that has the same base name as your Visual Basic project, but with a default extension of .SPL (or whatever file extension you specified using the Specify File Extensions... command from the File menu).

Extract Quoted Strings
Extracts strings appearing inside double quotation marks (  ).

Extract Remarks
Extracts strings appearing inside single quotation marks (  ).

Enable Extract Text
Selects the extract text operation for processing.

OK
Click OK to save the current dialog settings.

Cancel
Click Cancel to cancel changes to the dialog settings and exit the dialog.


 Procedure Tree Setup

The Procedure Tree Setup dialog box has options that affect the appearance of the Procedure Tree Diagram report.

Sort Events
Events always appear in the first level under the root for any Procedure Tree Diagram report. If you choose not to sort events, the events are grouped by form. Grouping events by form is generally a more useful way to view a procedure tree.

Sort Procedures
Sorts procedures alphabetically so they appear only once on any branch of the procedure tree. If the procedures are not sorted, they appear in the order in which XRef finds them.

Show Procedure Detail Only Once
Shows the detail for each procedure only once in the report.

Exclude External Procedures from Report
Excludes references to external DLL procedures in the report.

Insert Page Breaks in Report
Inserts page breaks and headings in the report.

Enable Report
Selects the report for processing.

OK
Click OK to save the current dialog settings.

Cancel
Click Cancel to cancel changes to the dialog settings and exit the dialog.


 Symbol Reports

Four symbol reports use a similar dialog box:

Symbol Summary Table

Symbol Cross Reference Table

Table of Unused Symbols

Table of Symbols Used in Procedures


 Symbols and Their Types

XRef uses the term symbol in its reports to refer to distinct program elements in Visual Basic. Most XRef reports provide information about these symbols, defined in the following table.

Basic Key Words	Labels
Forms	Numeric Constants
Controls	Named Constants
Control Arrays	Simple Variables
Properties	Simple Type Variables
Methods	Simple Object Variables
Events	Arrays
Sub Programs	Type Arrays
Functions	Object Arrays
Property Procedures	Object members unidentified due to context
NOTE  	Unlike other symbol categories, you cannot select the Object members--unidentified due to context category. This category always appears in the following reports: Symbol Summary, Symbol Cross Reference Table, and Table of Unused Symbols.


Basic Key Words

Any Visual Basic keyword or keywords that form a Basic phrase such as Input or Line Input.


Forms

Any form used in your project.


Controls

Any control.


Control Arrays

Arrays of controls.


Properties

Any form or control property.


Methods

Any form or control method.


Events

Any form or control event.


Sub Programs

Subprogram procedure names.


Functions

Function procedure names.


Property Procedures

Property procedures defined in class modules.


Lables
Labels

Line numbers or alphanumeric line labels.


Numeric Constants

Numeric constants such as the number 1, named constants such as CONST B_ON =  1 where B_ON becomes a named constant, and intrinsic constants such as Visual Basic.


Simple Variables

Any numeric or string variable that is not an array or element of an array.


Named Constants

Constants defined in code or found in objects used in the project.


Simple Type Variables

An aggregate variable made up of elementary Visual Basic data types. XRef reports only references to the type name, not the individual elements.


Simple Object Variables

Any form, control, database, or other object variable.


Type Arrays

Arrays of a type structure.


Object Arrays

Arrays of object variables.


Arrays

All string and numeric arrays.


Symbol Types - Summary Table
 Symbol Types--Summary Table

The Symbol Types--Summary Table dialog box lets you specify the symbols you want XRef to include in your Symbol Summary Table report.

Symbol types

Basic Key Words	Labels
Forms	Numeric Constants
Controls	Named Constants
Control Arrays	Simple Variables
Properties	Simple Type Variables
Methods	Simple Object Variables
Events	Arrays
Sub Programs	Type Arrays
Functions	Object Arrays
Property Procedures
Enable Report
Selects the report for processing.

OK
Click OK to save the current dialog settings.

Cancel
Click Cancel to cancel changes to the dialog settings and exit the dialog.


Symbol Types - Cross Reference Table
 Symbol Types--Cross Reference Table

The Symbol Types--Cross ReferenceTable dialog box lets you specify the symbols you want XRef to include in your Symbol Cross Reference Table report.

Symbol types

Basic Key Words	Labels
Forms	Numeric Constants
Controls	Named Constants
Control Arrays	Simple Variables
Properties	Simple Type Variables
Methods	Simple Object Variables
Events	Arrays
Sub Programs	Type Arrays
Functions	Object Arrays
Property Procedures
Enable Report
Selects the report for processing.

OK
Click OK to save the current dialog settings.

Cancel
Click Cancel to cancel changes to the dialog settings and exit the dialog.


Symbol Types - Unused Symbols
 Symbol Types--Unused Symbols

The Symbol Types--Unused Symbols dialog box lets you specify the symbols you want XRef to include in your Table of Unused Symbols report.

Symbol types

Basic Key Words	Labels
Forms	Numeric Constants
Controls	Named Constants
Control Arrays	Simple Variables
Properties	Simple Type Variables
Methods	Simple Object Variables
Events	Arrays
Sub Programs	Type Arrays
Functions	Object Arrays
Property Procedures
Enable Report
Selects the report for processing.

OK
Click OK to save the current dialog settings.

Cancel
Click Cancel to cancel changes to the dialog settings and exit the dialog.


Symbol Types - Used in Procedures
 Symbol Types--Used in Procedures

The Symbol Types--Used in Procedures dialog box lets you specify the symbols you want XRef to include in your Table of Symbols Used in Procedures report.

Symbol types

Basic Key Words	Labels
Forms	Numeric Constants
Controls	Named Constants
Control Arrays	Simple Variables
Properties	Simple Type Variables
Methods	Simple Object Variables
Events	Arrays
Sub Programs	Type Arrays
Functions	Object Arrays
Property Procedures
Enable Report
Selects the report for processing.

OK
Click OK to save the current dialog settings.

Cancel
Click Cancel to cancel changes to the dialog settings and exit the dialog.


Symbol Types - External to a Range
 Symbol Types--External to a Range

The Symbol Types--External to a Range dialog box lets you specify the types of symbols that are used both within and outside a specified range of line numbers that you want XRef to include in your Table of Symbols External to a Range report. Given this information, you can safely move a section of code into a separate procedure or module.

In Module
Selects the module in which you can define a range for the report.

Between lines...
Specify the range of lines in the selected module to report on.

Symbol types

Labels	Simple Type Variables
Property Procedures	Simple Object Variables
Numeric Constants	Arrays
Named Constants	Type Arrays
Simple Variables
Enable Report
Selects the report for processing.

OK
Click OK to save the current dialog settings.

Cancel
Click Cancel to cancel changes to the dialog settings and exit the dialog.


Default Output Path

Specifies a directory (path) for the XRef reports. If you leave this text box blank, which is the default, XRef writes its files to its own installation directory.


Use Graphics Characters in Reports

Tells XRef to use high-order (greater than 128) ASCII characters for dividing lines, headers and Procedure Tree Diagrams.

If the font you use to browse the report files does not support the standard IBM character set, you should not select this option. If you do not select this option, XRef substitutes conventional ASCII characters that work with any font.


Page Height

Specifies the maximum number of lines to be printed before a new page header is printed. If you enter -1, a new page header is printed only when XRef starts a new report type.


Page Width

Specifies the maximum number of characters that can appear in any single line. For a source listing report, Page Width determines the number of characters to print before word-wrapping occurs.

This option also lets you specify the number of levels to be displayed in the Procedure Tree Diagram report. The larger the number, the more levels XRef displays.

The valid range of characters for Page Width is 80 to 256 characters.


Autoload Project's XRef .INI File

Searches for and loads a previously created .INI (configuration) file that has the same base name as the Visual Basic project being loaded.

This option makes it possible to automatically load different settings for a Visual Basic project being cross-referenced. XRef looks for the .INI file using the following search path:

XRef installation directory

Visual Basic project directory

Default Path directory

Windows directory


Prompt Before Loading

Displays a prompt to let you choose whether to load a previously created .INI file for a Visual Basic project.


Conditional Compile ID Prefix

Specifies a prefix that you want XRef to add to the symbols it finds in a conditional compile block.  The default symbol is the pound (#) sign.

This option lets you identify symbols defined for conditional compiling and helps you to understand why the same name might appear twice.


Display Source When Reading

Displays your source code as XRef examines it. This setting does not affect the time XRef takes to examine your Visual Basic project.


Source Listing

Lists all source code. The listed source can optionally include line numbers that correspond to the program lines referenced in other XRef reports.


Extract Source Text to .SPL

Extracts all quoted strings and/or comments in the source files to an .SPL file, which can be used with a spelling checker to check the spelling of all text used in a program.

An .SPL file contains filenames and line numbers, which the Textin utility uses to merge your corrected text back into your Visual Basic project.


Procedure Tree Diagram

Lists all of your procedures and their dependencies in a graphical tree format. With Procedure Tree Diagrams you can see the interrelationships of events and procedures within an entire Visual Basic project.


Symbol Summary Table

Lists all specified symbol types with information about where they were defined and the number of times they were used.

The Symbol Summary report can quickly show you all of the symbols in a Visual Basic project, their scope, and how many times they are used. This type of report is useful for finding variables that are used only once or twice and could possibly be replaced with a single common temporary variable.


Symbol Cross Reference Table

Lists all specified symbol types and where they are used in the Visual Basic project. Each reference is listed with a physical line number relative to the beginning of the file. An equal sign (=) identifies the line numbers where variables are assigned.

This type of report is useful for showing both the range and the scope of the variables in your Visual Basic project. It can help you determine where variables are assigned and where they are referenced throughout the entire project.

Symbols are listed with the names of the modules and procedures in which they were used.


Table of Unused Symbols

Lists all specified symbols that were declared or created but never used. XRef also lists procedures that are never called, named constants, and variables that are referenced only once.

The Table of Unused Symbols is one of the most useful reports that a cross-referencing program can generate. Finding symbols or procedures that were defined but never used can be very difficult. Such errors can be caused by misspelling a name of a variable, deleting a control, or by editing a section of code that formerly referred to a variable.


Table of Symbols Used in Procedures

Lists symbols by procedure so you can see all specified symbols used within a single event, subprogram, or function. It shows the scope of a variable (Local, Module, or Global) and its lifetime (Static, Automatic or Parameter).

This type of report can help you weigh the tradeoffs between static and dynamic (automatic) procedures, as well as see what symbols are being used in a procedure.


List of Symbols External to a Range

Lists all variables that are used both within and outside a specified range of line numbers. Given this information, you can safely move a section of code into a separate procedure or module.


Controls Listed by Form

Lists all controls in your Visual Basic project next to the name of the form that contains them, as well as their control types (such as CheckBox, CommandButton, and ListBox) next to the control name.

Although the Symbol Summary Table report also lists names of forms and controls, it lists only names referenced in code. Because it is possible to have valid controls that are not referenced in code (such as a Label or Picture control whose contents are defined at design time), XRef provides the Controls Listed by Form report so you can have a list of all forms and controls in your project.


DLL and OCX Listing

Lists all .DLLs and/or Windows .EXE files (GDI, Kernel, User) referenced in your Visual Basic project as well as any .OCX files or .VBX files in the project (.VBP or .MAK) file. This listing also includes any version information available for each file.

The DLL and OCX Listing report helps you determine what files need to be distributed with your application.

NOTE  	This report lists any .DLLs and .OCX files found in your Visual Basic project. However, the DLL and .OCX Listing report does not verify that they are used by your project. The Unused Symbol Table report can help to verify if the listed .DLL and .OCX files are actually in use.


Sort Events

Events always appear in the first level under the root for any Procedure Tree Diagram report. If you choose not to sort events, the events are grouped by form. Grouping events by form is generally a more useful way to view a procedure tree.


Sort Procedures

Sorts procedures alphabetically so they appear only once on any branch of the procedure tree. If the procedures are not sorted, they appear in the order in which XRef finds them.


Show Procedure Detail Only Once

Shows the detail for each procedure only once in the report.


Exclude External Procedures from Report

Excludes references to external DLL procedures in the report.


Insert Page Breaks in Report

Inserts page breaks and headings in the report.


Print Source... Command from the File Menu

Your can think of the Print Source... command as a separate utility. The options you select on the Print Source dialog box do not affect the reports XRef creates when it cross-references your Visual Basic project.

This option is faster and more direct than using the Source Listing... command from the Report menu. Use Print Source... when you want to print the source for a Visual Basic project that XRef is not cross referencing.


Source Listing.... Command from the Report Menu

Use the Source Listing... command to print source code when XRef is also generating cross-reference reports for your Visual Basic project.


 Print Source

The Print Source dialog box lets you print the source code for your current or any other Visual Basic project. This dialog box is very similar to the Source Listing Options dialog box that you use when you select the Source Listing... command from the Report menu.

Project Name
Project File Window

Print Command Button
Output File Name Command Button

Sort Procedures
Print Procedures on Separate Pages
Include Form and Control Properties
Include Line Numbers
Print to File
Page Title

NOTE  	If the Visual Basic project that you load for printing source code is different from the Visual Basic project loaded for cross-referencing, then the former Visual Basic project remains loaded only while the Print Source dialog box is displayed.

OK
Click OK to save the current dialog settings.

Cancel
Click Cancel to cancel changes to the dialog settings and exit the dialog.


Print Procedures on Separate Pages

Select this option to print each procedure on a new page.


Include Form and Control Properties

Select this option if you want to include in your source listing the form and control properties that appear at the beginning of all form (.FRM) files. Generally, this information is not particularly useful and can take up much space in the report.


Include Line Numbers

Select this option to include line numbers in the source file. A line number refers to the location of a line of code in the source file. Line numbers are used primarily to relate the source code to the line numbers referenced in the other XRef reports.


Print to File

Select this option to direct the source listing to a disk file. By default, the name of this output file has the same base name as your Visual Basic project but with an .XRF file extension (or whatever extension you specified in the Output File Extensions dialog box for the Specify File Extensions... command from the File menu).

By default, XRef writes this source listing file to its installation directory, unless you specified a Default Output Path directory in the Options dialog box from the Report menu.


Output File Name
Output File Name Command Button

The Output File Name command button becomes enabled whenever you select the Print to File option. This command button lets you change the output path and/or name of your Visual Basic source listing file. When you click on the Output File Name command button, XRef displays the standard Windows File dialog box to let you enter a new path/filename for the source listing.


Print Command Button

After you click on the Print command button, the options that you choose remain selected the next time XRef displays the Print Source dialog box.


Browse Command Button

Displays the standard Windows File Open dialog box to let you select any Visual Basic project that you want to print. XRef automatically enters the name of the project you selected in the Project Name text box.


Project File Window

Where XRef displays the contents of the current Visual Basic project, if a project or Symbol Database has been opened (loaded). If a project is not open, XRef displays an empty Project File window.


Page Title

Where you can enter a title for each page in the source listing. If you leave the Page Title text box blank, XRef automatically inserts the full path and filename of the Visual Basic project.


Project Name

Contains the name of the Visual Basic project whose source code will be printed.

You cannot edit this text box. XRef automatically enters the name of the Visual Basic project you selected.


Sort Procedures

Sorts procedures alphabetically.


 Source Listing Options

The Source Listing Options dialog box lets you print the source code for the Visual Basic project that XRef will cross-reference. This dialog box is very similar to the Print Source dialog box that you use when you select the Print Source.... command from the File menu, but does not have the Browse and Output File Name command buttons or the Print to File text box. This means the Project File window can print only the Visual Basic project that was loaded through the File menu.

Project Name
Project File Window

Sort Procedures
Print Procedures on Separate Pages
Include Form and Control Properties
Include Line Numbers
Page Title

NOTE  	Any selections you make remain active until you generate the cross-referencing reports.

Enable Report
Selects the report for processing.

OK
Click OK to save the current dialog settings.

Cancel
Click Cancel to cancel changes to the dialog settings and exit the dialog.


 Report File Browser

The XRef Report File Browser lets you view a previously created file of XRef reports on your monitor screen.

How to load your XRef report output file for viewing

How to navigate in the Report File Browser

TIP  	Crescent recommends using a fixed-width font when viewing the XRef reports with the Report File Browser, because the data in the reports is formatted into columns. By default, the Report File Browser uses the Terminal font, which correctly displays the lines and branches in the Procedure Tree Diagram report.


 Report File Browser Menus

The XRef Report File Browser lets you view a previously created file of XRef reports on your monitor screen. It has four menus with options that help you search for text, locate specific pages, and, to customize your display.

Exit
Search
Bookmarks
Display


Exit

Quits the Report File Browser and returns to XRef. You can also press the ESCAPE key to exit.


Search

Displays the standard Windows Find dialog box, which lets you enter the text you want to find. The Search command works very much like the Visual Basic Find command. The search begins with the first character in the line displayed at the top of the window.

Subsequent searches (initiated by pressing F3) for the same text begin at the first character following the previous match. If you scroll the window in any direction after initiating the search and then press F3, the search begins with the first character.


 Loading a Report Output File in the Report File Browser

1.	Select the Browse Report File... command from the File menu. The standard Windows File Open dialog box appears.

2.	Select the name of the XRef report file that you want to view.


Bookmarks

Bookmarks let you mark and return quickly to specific lines of text. You can specify up to 50 bookmarks; however, you cannot set a bookmark on the first line of text. Instead, you can press CTRL+HOME to get back to the first line of text.

Toggle Bookmark
Sets a bookmark. You can also press CTRL+F2 to set a bookmark. You set a bookmark when the page you want to mark is displayed. A beep verifies that the bookmark has been set.

Deletes a bookmark.Move to the bookmark and select the Toggle Bookmark command or press CTRL+F2. A beep sounds to verify that the bookmark was deleted.

Next Bookmark
Locates the next bookmark in the Report File Browser. You can also press F2 to move forward to the next bookmark.

Previous Bookmark
Moves back to the previous bookmark. You can also press SHIFT+F2 to move back to the previous bookmark.


Display

The Display menu lets you select any font, font attribute, and any combination of foreground and background colors for the main window of the Report File Browser.

Font, Foreground Color...
Displays the standard Windows font dialog box, from which you can select the font, font attribute(s), and the foreground color.

Background Color...
Displays a color palette that lets you select the background color for the main window of the Report File Browser. If you are using a mouse, click on the color you want. If you are using the keyboard, use the arrow keys to select the color you want and press ENTER.

To remove the color palette and to cancel your background color selection, press ESCAPE or click on the color palette with the right mouse button.


 Textin Utility

See also Starting Textin and Merging an .SPL File Using Textin.

The Textin utility merges the text strings that you extracted using the Extract Source Text to *.SPL... command back into your Visual Basic source code. Together, the Extract Source Text to *.SPL... command and the Textin utility let you check the spelling of all quoted text and remarks in your source code.

NOTE  	Do not change the filenames or the line numbers of your source code or alter the number or the location of the quoted strings until you have merged your corrections back into your source code with the Textin utility.


 Starting Textin

See also Stopping Textin

When you start Textin by double-clicking on the icon in the XRef program group, the following Text In window appears:


To Merge an .SPL File
 Merging an .SPL File Using Textin

1.	Click on the SPL File Name... command from the File menu. The standard Windows File Open dialog box appears, which lets you select the .SPL file you want to merge.

You do not need to specify any other project or filenames. The .SPL file contains the names of the modules into which Textin merges the text.

2.	Click on the Start command from the Run menu to begin merging.

3.	Click on the Quit command from the Run menu to exit from Textin, after the merge has completed. Or, you can select another .SPL file to merge.


 Error Messages

Cannot find configuration [filename].

Cannot find [filename]. Please enter the correct path below.

Cannot find XREF4VB.KEY.

Error in XREF4VB.KEY file. Cannot continue.

[filename] is not a Symbol Database.

[filename] is not used by FileName.

Filename was not saved in Visual Basic 4.0 format. Cannot load this file.

Illegal function call or Subscript out of range.

Printer error.

This is not an XRef compatible .INI file. Cannot load.

Too many symbols. Try eliminating key words and numeric constants.


Cannot find configuration [filename]
Cannot find configuration [filename].

XRef could not find the specified configuration file. Either you misspelled it at the command line or the file is not on the drive and directory specified.


Cannot find filename. Please enter the correct path below
Cannot find filename. Please enter the correct path below.

This message appears if XRef cannot locate any external objects (OCX files or other OLE objects) referenced in the Visual Basic project (.VBP) file.

If the information that XRef finds in the .VBP file is different from the information found in the system Registry, you must enter the complete pathname where XRef can find the object. This error can occur if you created the Visual Basic project on a different system that had a different version of the object. If you created the Visual Basic project on the same system that is running XRef, this error is unlikely to occur.

To avoid this error in the future, you can remove the reference to the object using the following procedure. This procedure updates the .VBP file to contain a reference to the object as it exists on your system:

1.	Remove the object from the Custom Controls or References dialog box.

2.	Save the project.

3.	Select the object.

4.	Save the project again.


Cannot find XREF4VB.KEY
Cannot find XREF4VB.KEY.

The XRef executable (XREF.EXE) is unable to find the XREF4VB.KEY file. This file contains information about the Visual Basic keywords and methods, which are necessary for XRef to operate. The XREF4VB.KEY file must reside in the same drive and directory as the XREF.EXE file.


Error in XREF4VB.KEY file. Cannot continue
Error in XREF4VB.KEY file. Cannot continue.

An error occurred when XRef tried to load the XREF4VB.KEY file. This error indicates that the XREF4VB.KEY file has been corrupted. Unless you have a backup of this file, you must reinstall XRef.


[filename] is not a Symbol Database
[filename] is not a Symbol Database.

You tried to load a file that is not a Symbol Database compatible with XRef. You might have misspelled the filename or tried to load a file that has been corrupted. Either enter the filename again or highlight the filename in the file selection box.


[filename] is not used by FileName
[filename] is not used by FileName!

The module name you entered in the Symbol Types External to a Range dialog box does not exist or it is not used by your Visual Basic project. You might have misspelled the name when you filled in the dialog box. Verify that the name in the dialog box is spelled correctly.


Filename was not saved in Visual Basic 4.0 format. Cannot load this file.

This message appears if the project you opened was saved with an earlier version of Visual Basic. You must convert the project to Visual Basic Version 4.0 format by loading and saving the project under Visual Basic Version 4.0.


Illegal function call or Subscript out of range
Illegal function call or Subscript out of range.

These errors generally indicate an error in XRef. If you get either of these errors, contact our technical support staff.


Printer error
Printer error.

An error occurred when XRef attempted to access your printer. Either there is no printer attached to your system or a printer has not been installed.


This is not an XRef compatible .INI file. Cannot load.

This error occurs if you attempt to load an .INI file that was not created by XRef. XRef determines this by examining the first entry in the .INI file.


Too many symbols! Try eliminating key words and numeric constants.
Too many symbols. Try eliminating key words and numeric constants.

You get this error if the number of symbols XRef finds exceeds the 32,760 limit. Try excluding keywords and/or numeric constants in the reports.


 Selecting the Reports You Want to Generate

You can use one of the three following ways to select the XRef reports you want to generate:

1.	Use the Select Reports... command from the Report menu, which displays the Report dialog.

2.	Select the individual reports by highlighting their names on the Report menu.

3.	Use a previously created .INI file for your Visual Basic project.


 Selecting Your Reports Using the Report Menu

You can choose XRef reports by selecting the names of the individual reports from the Report menu. For more information about the Report menu, click on the menu items in the figure below.

NOTE  	To generate a report that you select from the Report menu, you must select the Enable Report checkbox on the dialog box for that report.


 Getting Technical Support

The Crescent technical support staff is ready to help you with problems that you encounter when installing or using XRef. It does not matter what component of XRef you are having a problem with; the Crescent technical support staff will do its best to help you succeed with XRef.

If you need technical support, contact Crescent using any of the following methods:

By Telephone	Contact Crescent's North American technical support staff at  (617) 280-3000 -- Monday through Friday from  9:00 a.m. to 5:00 p.m. EST.
By FAX	Contact Crescent by FAX at  (617) 280-4025.
Via BBS	Contact Crescent through our 24-hour bulletin board service at  (617) 280-4221.
Via CompuServe	Contact Crescent through CompuServe address 70662,2605 Crescent also maintains a section in the MS Windows Components A+ Forum on CompuServe. To reach the Crescent section, type the following at the CompuServe prompt: GO CRESCENT
By Electronic Mail	Contact Crescent using the Internet address crescent-support@progress.com
Via the WWW	View the Crescent Web page at http://www.progress.com/crescent
By Mail	Address your correspondence to: Technical Support Crescent Division, Progress Software Corporation 14 Oak Park Bedford, Massachusetts  01730
Please have your product name, version number, serial number, and system configuration information available so that the Crescent technical support staff can process your support requests as efficiently as possible. The version number for XRef appears in the About box.


Trademarks
Copyright © 1995, 1996 Progress Software Corporation

The information in this help file is subject to change without notice and Progress Software Corporation assumes no responsibility for any errors that may appear in this file.

Crescent Internet ToolPak™, EnQuiry™, PowerPak Pro™, and VB4 Plus Pak™ are trademarks of Progress Software Corporation

Crescent™, NetPak®, PDQComm®, QuickPak®, and XRef™ are trademarks or registered trademarks of Crescent Software, Inc.

All other company and product names are the trademarks or registered trademarks of their respective companies.


 Loading Initialization Files

See also Creating Initialization Files for Visual Basic Projects.

If you have previously saved your reporting options for your Visual Basic project to an .INI file and you want to use them again, click on Retrieve Settings from .INI File... from the File menu. This displays the standard Windows File Open dialog box, which lets you select the .INI file you want to load in XRef.


 Creating Initialization Files for Visual Basic Projects

See also Loading Initialization Files.

You can save many different .INI files with different names and load them as necessary; for example, you can create project-specific .INI files. XRef can automatically load these .INI files when you open the corresponding Visual Basic projects.

Creating an automatic .INI file for a Visual Basic project


 Creating an Automatic .INI File for a Visual Basic Project

1.	Use the Save Settings to File... command from the File menu to save your reporting options to an .INI file that has the same base name as your Visual Basic project. You must save this .INI file to one of four directories:

XRef installation directory

Default Output Path directory (if you specified one using the Options... command from the Report menu)

Visual Basic project directory

Your Windows directory

2.	Select the Autoload Projects XREF.INI file checkbox on the Options dialog box from the Options... command.


 About the Report Menu

When you display the Report menu, reports that have a check mark to the left of their names have been selected for processing.

You can choose all of the XRef reports, except the Controls Listed by Form and the DLL and OCX Listing, from the Report menu. When you select a report from the Report menu, a dialog box appears, which lets you choose among the options for that report.


 Report File Browser Navigation Keys

To move through the report file, you can use either the arrow keys or scroll bars. The following table lists the different key and key combinations that you can use to navigate in the Report File Browser.

Home	Go to the left margin, current line
End	Scroll right to display the longest line in the current page
Ctrl+Home	Go to the beginning of file, first column
Ctrl+End	Go to the end of file, first column
PgUp, Ctrl+PgUp	Scroll up one page
PgDn, Ctrl+PgDn	Scroll down one page
Left	Scroll left one character
Ctrl+Left	Scroll left 1/2 page
Right	Scroll right 1 character
Ctrl+Right	Scroll right 1/2 page
Down	Scroll down 1 row
Ctrl+Down	Scroll down 1/2 page
Up	Scroll up 1 row
Ctrl+Up	Scroll up 1/2 page
Esc	Exit the File Browser
NOTE  	The Report File Browser was coded in Visual Basic, using the standard Picture Box control and scroll bars. For optimum speed, text is printed to the Picture Box with its AutoRedraw property set to False. As a result, the text in the Report File Browser disappears when you place another window over it and then remove that window. If this happens, you can redisplay the text by clicking anywhere in the window of the Report File Browser.


 Generating Reports

1.	Start XRef by double-clicking its icon or by using the Run command from the File menu in the Program Manager.

2.	Click on the Open .VBP Project File... command from the File menu. The standard Windows File Open dialog box appears. Select the Visual Basic project you want to examine.

3.	From the Report menu, select the types of reports you want to generate.

4.	From the Output menu, select the report destination. You can send reports to a printer or to a file.

NOTE  	Using the Report File Browser, you can browse the reports that you send to a file. Click on the Browse Report File... command from the File menu to view your reports.

5.	From the Run menu, click on the Start command to generate the reports.

NOTE  	You can save your current report selections for a Visual Basic project to an .INI file. If you want to run the same reports again in the future, you need only to load that projects .INI file in XRef by clicking on the Retrieve Setting From .INI File... command from the File menu.

6.	From the File menu, click on the Exit command to leave XRef after generating your reports.


 Starting XRef Using Command Line Arguments

When you start XRef from the Program Manager using the  (File) Run... command, you can specify the following options:

XREF FileName[.vbp], INIFile[.ini][;]

NOTE  	All command-line arguments are optional, because the parameters are also options in XRef. You can omit any parameter, but you can specify only the .INIFile after the comma.

FileName is the name of the Visual Basic project file loaded in XRef. This extension is optional because XRef automatically appends .VBP to the FileName.

If you specify a Symbol Database as the FileName, you must include the .SDB extension or whatever extension you have defined for Symbol Databases.

INIFile is the name of a previously saved .INI file for a Visual Basic project. This extension is optional, because XRef automatically appends .INI to the INIFile name.

You can use a semicolon (;) to terminate a command line, which also causes XRef to start generating the reports. If the semicolon is omitted, XRef waits for you to select the Run command.


 Selecting the Source Files for Your Reports

You can use two types of files as input for generating reports with XRef:

Visual Basic project file (.VBP)

Symbol Database file (.SDB)


 Loading Visual Basic Project Files

You load your Visual Basic project (source code) in XRef the same way that you load your project in Visual Basic: by clicking on the Open .VBP project file... command from the File menu. The standard Windows File Open dialog box appears, which lets you select the Visual Basic project you want as an input file.


 Symbol Databases

Whenever XRef examines a Visual Basic project, it also creates a Symbol Database file. This file has the same base name as your Visual Basic project with an .SDB file extension (or whatever extension you defined using the Specify File Extensions... command from the File menu).


 Loading Symbol Databases

To load a Symbol Database, click on the Load Symbol Database... command from the File menu. The standard Windows File Open dialog box appears, which lets you select the Symbol Database you want as an input file.

After you load a Symbol Database (or created one after examining a project file) all subsequent reports are generated from it until you load a new Symbol Database or Visual Basic project.


 Starting and Stopping Your XRef Reports

After you have loaded a Visual Basic project or a Symbol Database (.SDB file) and selected one or more XRef reports, click on the Start command from the Run menu. The Start command begins generating the XRef reports.

If you want to halt XRef while it is examining your Visual Basic project or generating reports, press the ESCAPE key.

After generating the first report, XRef uses the .SDB file to generate any subsequent reports during a session, unless you open a new Visual Basic project or .SDB file.


Select Reports...

The Select Reports command brings up the Reports dialog box, which lets you specify the reports you want XRef to generate. XRef offers 10 types of analytical report for Visual Basic projects.


Options....

The Options command brings up the Options dialog box, which lets you specify various settings that affect all XRef reports.


 Choosing the Destination for Your Reports

You choose the destination for your XRef reports using the Output menu. You can send your reports to a file or to a printer.

How to send reports to a file

How to send reports to a printer

Select either the To File or To Printer command for the type of output you want for your XRef reports. XRef displays your selection in the status box at the bottom of its main window and places a check mark next to your selection in the Output menu.

NOTE  	XRef always displays its current output path or device in the status box labeled Output To:.


 Sending Reports to a File

XRef formats reports that you direct to a file according to the options you specified in the Options dialog box. XRef writes these reports to a file with a default .XRF file extension in its own installation directory.

You can override the default output path of the report file in either of two ways:

1.	Specify a new default path in the text box labeled Default Output Path in the Options dialog box.

NOTE  	The Default Output Path affects all files that XRef creates.

2.	Specify a new path and filename for the report file, using the Set Output File Name... command from the Output menu.

NOTE  	Set Output File Name... only redirects the report (.XRF) file. XRef writes all other files to its own installation directory or to the directory you specified in the Default Output Path text.

You can change the default .XRF extension for a report file, using the Specify File Extensions... command from the File menu.

You can view the reports you send to a file using the Report File Browser.


 Sending Reports to a Printer

To send your XRef reports to a printer, select the To Printer command from the Output menu. If you have not previously selected your page layout or printer options, you can still select them, because XRef does not send reports to the printer until you select the Start command from the Run menu.

Select the Page Setup...  command from the File menu to specify the following options:

Font

Print orientation

Margins

Select the Print Setup... command from the File menu to specify your printer options.


 Set Output File Name...

XRef enables the Set Output FileName... command, if you direct the XRef reports to a file when either a Visual Basic project or Symbol Database is open. This command lets you specify a new path and filename, which overrides the Default Output Path name.

Specifying a new output path and filename is optional. By default, XRef sends its reports to a file in its own installation directory (or whatever path you specified as the Default Output Path in the Options dialog box), using the base name of your Visual Basic project with an .XRF extension.

NOTE  	Set Output File Name... only redirects the report (.XRF) file. XRef writes all other files to its own installation directory or to the directory you specified in the Default Output Path text box.


 Displaying Procedures in a Module

To display individual procedures within each Visual Basic module in the Project File window of the Print Source or Source Listing Options dialog, do one of the following:

Double-click on the name of the module.

Select the name of the module and press ENTER.

When XRef lists the procedure and module names, the procedure names are indented in lowercase letters under the module name.

If you select the Sort Procedures checkbox, XRef lists the procedures in the list box alphabetically; otherwise, XRef lists the procedures by the order of their appearance in the source file.

NOTE  	The status of the Sort Procedures checkbox does not affect the order in which the procedures are listed in the printed report

To return to the module name only, do one of the following:

Double-click on the name of the module.

Select the name of the module and press ENTER.


 Selecting Modules or Procedures for Printing

To select a module or a procedure for printing, click once on the name of the procedure or module that appears in the Project File window of the Print Source or Source Listing Options dialog box.

When you select a module name, XRef prints all of its source code. If you select individual procedures, XRef prints only those procedures.

To cancel your selection, click once on the highlighted module or procedure.

NOTE  	You cannot select the module name when its procedures are displayed. XRef cannot print both individual procedures and the entire module at the same time.


 Using the Page Title Text Box

The Page Title text box lets you enter a title for each page in the source listing. If you leave the Page Title text box blank, XRef automatically inserts the full path and filename of the Visual Basic project.

XRef automatically prints the following information in the headers of all the pages in the source listing:

Name of the source file

Current date and time

Page number


 Selecting a Visual Basic Project from the Print Source Dialog Box

1.	From the Print Source dialog box, click on the Browse button to display the standard Windows File Open dialog box.

2.	From the Open Visual Basic Project File dialog box, select the Visual Basic project whose source code you want to print.

In the Project File window, XRef displays the modules of your Visual Basic project.

NOTE  	The Visual Basic project you select does not change the project (if any) you loaded from the XRef File menu.


 Printing Your Source Code

1.	Choose either the Print Source or Source Listing... command, depending on whether the Visual Basic project whose source code you want to print will be cross referenced.

2.	Select a Visual Basic project whose source code you want to print, if a project is not already loaded. See also Selecting a Visual Basic Project from the Print Source Dialog Box.

3.	Click on one or more names of modules or procedures that you want to print. See also Displaying Procedures in a Module and Selecting Modules or Procedures for Printing.

4.	Enter any information that you want to appear on each page of the report in the Page Title text box. See also Using the Page Title text box.

5.	Select the destination for your source file if the project will not be cross-referenced. Choose either the Print command button or the Print to File text box on the Print Source dialog box.

If the source code is being printed using the Source Listing... command, then the source code report is directed to the same destination as the other reports. See also Choosing the Destination for Your Reports.


 Help Menu

Provides access to the XRef online help system.

Contents
Runs Help and displays the table of contents for XRef.

Search for Help On
Displays the Search dialog box.

How to Use Help
Provides information on using Help.

About XRef
Displays a dialog box with the version number and the amount of available memory.


 File Menu

Loads Visual Basic project or Symbol Database, and initialization files. Sets options for printer and printed reports. Prints source code without cross-referencing. Stops XRef.

Open .VBP Project File...
Loads a Visual Basic project (.VBP) file in XRef using the standard Windows File Open dialog box.

Open Symbol Database...
Loads a Symbol Database (.SDB) file in XRef using the standard Windows File Open dialog box.

Browse Report File...
Displays the standard Windows File Open dialog box for selecting a report output file to browse with the Report File Browser.

Page Setup...
Displays the Page Setup dialog box, which specifies the fonts and margins for the XRef reports.

Printer Setup...
Displays the standard Windows Print Setup dialog box, which lets you configure the printer for printing the XRef reports.

Print Source...
Displays the Print Source dialog box, which lets you print the source code of a Visual Basic project that has not been loaded for cross-referencing.

Specify File Extensions
Displays the Output File Extension dialog box, which changes the default file extensions for the XRef report output files, the Symbol Database files, and the Extract Source Text (.SPL) files.

Save Settings to .INI File...
Displays the standard Windows File Open dialog box, which lets you save your XRef reporting options to a configuration or (initialization) .INI file.

Retrieve Settings from .INI File...
Displays the standard Windows File Open dialog box, which lets you load an .INI file for a Visual Basic project that you want to cross reference.

Exit
Closes the current Visual Basic project and quits XRef.


 Report Menu

Specifies global report options and the types of reports to be generated.

Select Reports...
Displays the Reports dialog box, which lets you choose among ten types of analytical report for Visual Basic projects.

Source Listing...
Displays the Source Listing Options dialog box, which lists all source code. The source code listing report can be sent to a file or to a printer.

Extract Source Text to *.SPL...
Extracts all quoted strings and/or comments in the source files to an .SPL file, which can be run through a spelling checker.

Procedure Tree Diagram...
Displays the Procedure Tree Setup dialog box for the Procedure Tree Diagram report.

Symbol Summary Table...
Displays the Symbol Types--Summary Table dialog box for the Symbol Summary Table report.

Symbol Cross Reference Table...
Displays the Symbol Types--Reference Table dialog box for the Symbol Cross Reference Table report.

Table of Unused Symbols...
Displays the dialog box Symbol Types--Table of Unused Symbols for the Table of Unused Symbols report..

Table of Symbols Used in Procedures...
Displays the Symbol Types--Used in Procedures dialog box for the Table of Symbols Used in Procedures.report.

List of Symbols External to a Range
Displays the Symbol Types--External to a Range dialog box for the List of Symbols External to a Range report.

Options...
Displays the Options dialog box, which lets you specify various settings that affect all XRef reports.


 Output Menu

Specifies the destination for all reports.

To File
Sends XRef reports to an output file.

To Printer
Sends XRef reports to your default printer.

Set Output File Name
Specifies a new path and filename which overrides the Default Output Path name for the XRef report file.


 Run Menu

Starts generating the reports.

Start
Begins generating the XRef reports that were selected for processing.


 Text In Menus

The Textin utility merges the text strings that you extracted using the Extract Source Text to *.SPL... command back into your Visual Basic source code. The Textin utilty has two menus: File and Run.

File

SPL File Name
Displays the standard Windows File Open dialog box, which lets you specify the SPL file you want to merge back into your source code with using Textin.

Quit
Exits Textin.

Run
Starts merging the contents of the .SPL file back into the source code.


Object members unidentified due to context.

Properties, methods, or other object members that cannot be identified because of the context in which they are used.


 What is XRef?

Technical Support             Copyright

XRef is a cross-referencing program that reads and analyzes virtually any Visual Basic 4.0 program. Unlike other cross-referencing utilities that merely list variables, XRef generates a complete report for your Visual Basic project, including a table of contents for reports having four or more pages.

To help you analyze your Visual Basic project, XRef lets you choose among many types of reports and generates formatted source-code listings. You can send all reports and listings to either a printer or a disk file. If you send your reports to a disk file, you can use the Report File Browser to view your report output file.

XRef comes with a utility known as Textin. You use Textin with an .SPL file, which is an ASCII text file that XRef generates when you extract comments and quoted strings from your Visual Basic program. With your comments in the .SPL file, you can then run the .SPL file through your favorite spelling checker. After you have corrected your spelling mistakes, you can then use Textin to merge your corrections back into your Visual Basic program.


 How To...

These procedures explain how to generate reports and perform other tasks with XRef.

XRef

Start XRef
Stop XRef

Source Files for Reports

Load Visual Basic Project Files
Load Symbol Databases

Generating Reports

Generate Reports (Overview)
Format Your Reports
Select Reports Using the Select Reports... command
Select Reports Using the Report Menu
Select Reports Using Initialization Files
Start and Stop Your XRef Reports

Report Destinations

Send Your Reports to a File
Send Your Reports to a Printer
Change the Name of the XRef Report Output File
View XRef Reports in an Output File

Source Code Listings

Print Your Source Code

INI Files

Create an Automatic Initialization File for a Visual Basic Project

Textin Utility

Start Textin
Merge an .SPL File Using Textin
Stop Textin


 Starting XRef

See also Starting XRef Using Command Line-Arguments.

Start XRef by double-clicking on the icon in the XRef program group or by using the Run command from the File menu in the Program Manager.


 Stopping XRef

From the File menu, click on the Exit command to leave XRef after generating your reports.


 Stopping Textin

Click on the Quit command from the Run menu to exit Textin, after the merge has been completed.


 Formatting Your Reports

See also How to Specify Non-English Report Titles for International Users

XRef provides the following dialogs, which let you choose various options for formatting your reports:

Page Setup	Specifies fonts and margins.
Print Setup	Displays the standard Windows Print Setup dialog for setting your printer options.
Options	Specifies page height, page width, graphic characters, and Conditional Compile ID prefix


 How to Specify Non-English Report Titles for International Users

If you use XRef reports in international settings, you might want to translate the titles of these reports into the native language of your users. The XRef report titles appear under the International section of the XREF.INI file in your top-level system directory. You can change these titles, provided that each title fits on a single line in the reports.

The following table shows the default titles for the XRef reports.

XRef Report	Report Heading
Procedure Tree Diagram	Report Heading=Procedure Tree Diagram
Basic Keywords Usage	Report Heading=Basic Keyword Usage Table
Symbol Summary Table	Report Heading=Symbol Summary Table
Cross Reference Table	Report Heading=Cross Reference Table
Unused Symbol Table	Report Heading=Unused Symbol Table
Table of Symbols Used  in Procedures	Report Heading=Table of Symbols Used in Procedures
List of Symbols External  to a Range	Report Heading=List of Symbols External to a Range
Controls Listed by Form	Report Heading=Controls Listed by Form
DLL and VBX Report	Report Heading =DLL and VBX Report Listing